package org.lingshi.entity;

import lombok.Data;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

@Data
public class Menu {
    private Integer id;
    private String icon;
    private String name;
    private Set<Menu> childs = new LinkedHashSet();
    private String url;
    private Integer parId;
    public Menu(){}
    public Menu(Integer id, String name) {
        this.id = id;
        this.name = name;
    }
    public void addMenu(Menu m) {
        childs.add( m );
    }
}
